package com.mutouren.modules.datapush.dao.impl;

import com.mutouren.modules.datapush.dao.ConcurrentStrategyDao;
import com.mutouren.modules.datapush.dao.DaoFactory;
import com.mutouren.modules.datapush.dao.PushMessageDao;
import com.mutouren.modules.datapush.dao.RepeatStrategyDao;

public class DaoFactoryImpl implements DaoFactory{
	
	private	PushMessageDao pushMessageDao;
	private	ConcurrentStrategyDao concurrentStrategyDao;
	private	RepeatStrategyDao repeatStrategyDao;
	
	private static DaoFactory instance;	
	static {
		instance = new DaoFactoryImpl();
	}
		
	private DaoFactoryImpl() {
		pushMessageDao = new PushMessageDaoImpl();
		concurrentStrategyDao = new ConcurrentStrategyDaoImpl();
		repeatStrategyDao = new RepeatStrategyDaoImpl();
	}
	
	public static DaoFactory getInstance() {
		return instance;
	}		

	@Override
	public PushMessageDao getPushMessageDao() {
		return pushMessageDao;
	}

	@Override
	public ConcurrentStrategyDao getConcurrentStrategyDao() {
		return concurrentStrategyDao;
	}

	@Override
	public RepeatStrategyDao getRepeatStrategyDao() {
		return repeatStrategyDao;
	}

}
